import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from python_ai.common.xcommon import sep
pd.set_option('display.max_rows', None, 'display.max_columns', None, 'display.max_colwidth', 1000, 'display.expand_frame_repr', False)
plt.rcParams['font.sans-serif'] = ['Simhei']
plt.rcParams['axes.unicode_minus'] = False

plt.figure(figsize=[6, 6])
spr = 1
spc = 1
spn = 0

spn += 1
plt.subplot(spr, spc, spn, projection='polar')

data_length = 6
angles = np.linspace(0, 2 * np.pi, data_length, endpoint=False)

labels = ['生存', '输出', '团战', 'KDA', '发育', '生存']
data = [2, 3.5, 4, 4.5, 5, 3.3]

data = np.concatenate([data, [data[0]]])  # for 闭环 # ATTENTION
angles = np.concatenate([angles, [angles[0]]])  # for 闭环
print(data)
print(angles)

plt.title('Abilities')
plt.polar(angles, data, color='c', marker='o')
plt.xticks(angles[:-1], labels)

# Finally show all drawings.
plt.show()